﻿using Microsoft.EntityFrameworkCore;

namespace EM
{
     public class HallDbContext:DbContext
    {
        public HallDbContext(DbContextOptions<HallDbContext> opts) : base(opts)
        {

        }
        public DbSet<User> User { get; set; }


        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<User>().HasData(new User()
            {
                Id = Guid.NewGuid(),
                Age = 16,
                Email = "admin@admin.com",
                Gender = true,
                FirstName = "张",
                LastName = "三",
                PhoneNumber = "123456789",
            },
            new User()
            {
                Id = Guid.NewGuid(),
                Age = 21,
                Email = "lisi@admin.com",
                Gender = false,
                FirstName = "李",
                LastName = "四",
                PhoneNumber = "987321456",
            }
            );

        }
    }
}
